package sys_role

import (
	"time"

	"github.com/beego/beego/v2/client/orm"
)

type SysRole struct {
	RoleId     int       `orm:"column(role_id);pk" gorm:"primaryKey" description:"角色ID"`
	RoleName   string    `description:"角色名称"`
	CreateTime time.Time `description:"创建时间"`
	ModifyTime time.Time `description:"修改时间"`
}

func (s *SysRole) Create(role *SysRole) (err error) {
	db := orm.NewOrm()
	_, err = db.Insert(role)
	return
}
